<?php


namespace app\api\controller;


use app\common\controller\Api;

class Villagers extends Api
{
    // 无需登录的接口,*表示全部
    protected $noNeedLogin = ['*'];
    // 无需鉴权的接口,*表示全部
    protected $noNeedRight = ['*'];

    /**
     * 获取分页列表
     * @ApiMethod   (GET)
     * @param int $page
     * @param int $limit 数据条数
     */
    public function getPageList(\app\common\model\VillagersModel $VillagersModel)
    {
        $page = $this->request->request('page',1);
        $limit = $this->request->request('limit',5);
        $data = $VillagersModel->getPageList($page,$limit);
        $this->result($data['msg'], $data['data'], $data['code']);
    }

}